Skip to content

fix: prune removed capability entries from pharn.records.json - #92

Merged
PrzemekGalarowicz merged 2 commits into
mainfrom
feat/remove-prunes-records
Aug 12, 2026
Merged

fix: prune removed capability entries from pharn.records.json#92
PrzemekGalarowicz merged 2 commits into
mainfrom
feat/remove-prunes-records

Conversation

@PrzemekGalarowicz

Copy link
Copy Markdown
Contributor

Summary

  • pharn remove now prunes that capability’s entries from pharn.records.json (key-prefix filter), so records no longer describe deleted files until the next update.
  • Mirrors add’s mergeCapabilityRecords guard: absent/corrupt/stale-stamped stores are left byte-identical (never minted or blessed); no-match skips the write.
  • Docs (remove, pharn-records), CHANGELOG, and CLAUDE.md updated; tests cover prune, already-gone, and leave-store-alone paths.

Test plan

  • npm test (or at least npx vitest run tests/remove.test.ts)
  • Manual: install a capability → pharn remove <name> → confirm matching keys gone from pharn.records.json and stamp unchanged
  • Manual: remove when dir already gone → stale keys still pruned
  • Manual: absent/corrupt records file → remove still succeeds; store untouched

Made with Cursor

remove left records describing deleted files until the next update;
prune by key prefix so already-gone dirs are cleaned too.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@PrzemekGalarowicz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 861346c9-24df-458a-a8b6-66fbb83507d7

📥 Commits

Reviewing files that changed from the base of the PR and between 21db522 and 4b8a0be.

📒 Files selected for processing (17)
  • .dev/features/remove-prunes-records/GRILL.md
  • .dev/features/remove-prunes-records/PLAN.md
  • .dev/features/remove-prunes-records/REGRESSION.md
  • .dev/features/remove-prunes-records/REVIEW.md
  • .dev/features/remove-prunes-records/SHIP.md
  • .dev/features/remove-prunes-records/VERIFY.md
  • .dev/features/remove-prunes-records/regression-report.json
  • .dev/features/remove-prunes-records/verify-report.json
  • .pharn/pharn-dev-regress/base-results.json
  • .pharn/pharn-dev-regress/head-results.json
  • .pharn/writes-scope.json
  • CHANGELOG.md
  • CLAUDE.md
  • docs/commands/remove.md
  • docs/reference/pharn-records.md
  • src/commands/remove.ts
  • tests/remove.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PrzemekGalarowicz
PrzemekGalarowicz merged commit 3645fdf into main Aug 12, 2026
12 checks passed
@PrzemekGalarowicz
PrzemekGalarowicz deleted the feat/remove-prunes-records branch August 12, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant